<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>

<body>
    <script>
        class User {
            constructor(name, pass) {
                this.name = name;
                this.pass = pass
            }
            showName() {
                console.log(this.name)
            }
        }
        class VipUser extends User {
            constructor(name, pass, level) {
                super(name, pass, level)
                this.level = level
            }
            showLevel() {
                console.log(this.level)
            }
        }
        var u1 = new VipUser('呵呵', '123456', "100")
        u1.showLevel()
    </script>
</body>

</html>